package com.shop.zkmall.app.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 优惠券表
 * </p>
 *
 * @author ${author}
 * @since 2025-11-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("cere_buyer_coupon")
@ApiModel(value="CereBuyerCoupon对象", description="优惠券表")
public class CereBuyerCoupon implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "优惠券ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "优惠券名称")
    private String couponName;

    @ApiModelProperty(value = "优惠券类型 0满减券 1折扣券 2无门栏圈")
    private Integer couponType;

    @ApiModelProperty(value = "优惠券描述")
    private String couponDesc;

    @ApiModelProperty(value = "总数量 -1 不限量")
    private Integer totalCount;

    @ApiModelProperty(value = "已领取数量")
    private Integer receivedCount;

    @ApiModelProperty(value = "已使用数量")
    private Integer usedCount;

    @ApiModelProperty(value = "优惠金额（满减、现金券）")
    private BigDecimal amount;

    @ApiModelProperty(value = "折扣券，95 = 9.5折")
    private BigDecimal discount;

    @ApiModelProperty(value = "使用门槛金额 (满多少减)")
    private BigDecimal minAmount;

    @ApiModelProperty(value = "有效期类型：1固定时间 2领取后生效")
    private Integer validType;

    @ApiModelProperty(value = "固定有效期开始")
    private LocalDateTime validStart;

    @ApiModelProperty(value = "固定有效期结束")
    private LocalDateTime validEnd;

    @ApiModelProperty(value = "领取后有效天数")
    private Integer validDays;

    @ApiModelProperty(value = "状态：0禁用 1启用 2已过期")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;


}
